<template>
  <div class="personalDetails" v-if="!companyList">
    <div class="box">
      <div class="top">
        <div class="img">
          <i class="el-icon-close"></i>
        </div>
        <div class="top-right">
          <p>暂无任何企业信息</p>
          <span>新建企业后即可正常使用平台功能</span>ist
        </div>
      </div>
      <div class="bottom">
        <img src="@/assets/cer.png" alt="">
        <span @click="jump">新建企业</span>
      </div>
    </div>
  </div>
</template>

<script>
import { getItem } from '../../../utils/store'
export default {
  data() {
    return {
      companyList:[]
    }
  },
  methods:{
    jump(){
      this.$router.push('certification')
     },
     gouserlist(){
       if(this.companyList){
         this.$router.push('/certificationlist')

       }
     }
  },
  created(){
    this.companyList=getItem('USER_INFO').data.data.companyList
      this.gouserlist()
  
  }

}
</script>

<style lang="less" scoped>
.personalDetails{
  width: 100%;
  height: 100%;
  position: relative;
  .box{
    width: 600px;
    height: 200px;
    border: 1px solid rgb(215, 215, 215);
    position: absolute;
    top: 50%;
    left: 50%;
    transform:translate(-50%,-50%);
    .top{
      display: flex;
      justify-content: center;
      align-items: flex-end;
      height: 100px;
      .img{
        height: 50px;
        width: 50px;
        color: #ccc;
        font-size: 30px;
        text-align: center;
        line-height: 50px;
        font-weight: bold;
        background-color: rgb(254, 176, 0);
        border-radius: 50%;
      }
      .top-right{
        margin-left: 20px;
        p{
          font-size: 20px;
          margin-bottom: 10px;
        }
        span{
         
          font-size: 12px;
          color: rgb(170, 170, 170)
        }
      }
    }
    .bottom{
      margin-top: 20px;
      display: flex;
      justify-content: center;
      img{
        margin-right: 10px;
      }
      span{
        text-align: center;
        line-height: 50px;
        color: rgb(24, 174, 255);
        cursor:pointer;
      }
    }
  }
}
</style>